import request from '@/request/index.js';
import requestAi from '@/request/index-ai.js';

// 预问诊单提交发送给医生
export function submitPreConsultationMsg(data) {
	return request.post({
		url: '/admin-api/collaboration/order-consultation/send-pre-consultation-msg',
		data: data || {},
		custom: {
			title: "提交预问诊单",
			authentication: true
		}
	});
}

export function submitAskDiagnosis(data) {
	return request.post({
		url: '/app-api/collaboration/order-consultation/create',
		data: data || {},
		custom: {
			title: "提交问诊",
			authentication: true
		}
	});
}

export function validateAskDiagnosis(params) {
	return request.get({
		url: '/app-api/collaboration/order-consultation/validate-patient-order-consultation',
		params: params || {},
		custom: {
			title: "校验问诊",
			authentication: true
		}
	});
}

export function cancelAskDiagnosis(params) {
	return request.get({
		url: '/app-api/collaboration/order-consultation/consultation-order-cancel',
		params: params || {},
		custom: {
			title: "取消问诊",
			authentication: true
		}
	});
}

export function payAskDiagnosis(params) {
	return request.post({
		url: '/app-api/collaboration/order-consultation/wait-pay',
		params: params || {},
		custom: {
			title: "待支付问诊支付",
			authentication: true
		}
	});
}

export function getAskDiagnosisList(params) {
	return request.get({
		url: '/app-api/collaboration/order-consultation/consultation-order-page',
		params: params || {},
		custom: {
			title: "获取问诊列表",
			authentication: true
		}
	});
}

export function getHistoryAskDiagnosisList(params) {
	return request.get({
		url: '/app-api/collaboration/order-consultation/patient_consultation-order_history',
		params: params || {},
		custom: {
			title: "获取历史问诊",
			authentication: true
		}
	});
}

export function getMyAskDiagnosisEvaluateList(params) {
	return request.get({
		url: '/app-api/collaboration/comment-consultation/my-comment-page',
		params: params || {},
		custom: {
			title: "获取我的问诊评论列表",
			authentication: true
		}
	});
}

export function preAskDiagnosisDialogue(params) {
	return requestAi.post({
		url: '/ai-api/preConsultation/conversation',
		data: params || {},
		custom: {
			title: "开始预问诊",
			authentication: true
		}
	});
}

export function getPreAskDiagnosisPartSymptoms(params) {
	return requestAi.get({
		url: '/ai-api/preConsultation/partSymptoms',
		params: params || {},
		custom: {
			title: "查询预问诊部位症状",
			authentication: true
		}
	});
}